package 富婆梦.第一阶段.第七周IO流;

import java.io.*;

/**
 * @ProjectName: java-learning
 * @Package: 富婆梦.第一阶段.第七周
 * @ClassName: TestDataInputStream
 * @Author: hemengjin
 * @Description: 测试DataInputStream的使用
 * @Date:2021/9/9 15:17
 * @Version: 1.0
 */
public class TestDataInputStream {
    public static void main(String[] args) {
        File file = new File("D:/何梦锦的宝藏/Java学习/java-learning/src/Main.java");
        try {
            FileInputStream fs = new FileInputStream(file);
            BufferedInputStream br = new BufferedInputStream(fs);
            DataInputStream ds = new DataInputStream(br);
            while (ds.available()!=0){
                System.out.println((char) ds.readByte());
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
